<!DOCTYPE HTML>
<title>contentDocument.open test for creating new window</title>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<body>
<script>
test(function() {
    frame = document.body.appendChild(document.createElement("iframe"));
    frame.contentWindow.open = function() {
        assert_unreached('FAIL: contentDocument.open must not invoke contentWindow.open, contentDocument.open must open a new window with only internal implementation.');
    }
    w = frame.contentDocument.open(1, 1, 1);
    assert_equals(typeof(w), 'object', 'w should be a window object');
});
</script>
</body>
